var t = require("../../services/api.js"),
  e = require("../../utils/util.js"),
  n = getApp();
var app = getApp();


Page({
  data: {
    userinfo: {},
    user_integral: 0,
    js: 0
  },
  onLoad: function(t) {
    wx.request({
      url: app.globalData.hosts + "/xcxapi/getmember",
      header: {
        'Cookie': 'PHPSESSID=' + app.globalData.sessionId
      },
      data: {
        id: app.globalData.member_id
      },
      success: (res) => {
        console.log(res)
        this.setData({
          userinfo: res.data.data,

        })
      },

    });
  },
  onReady: function() {},
  onShow:function(){
    this.onLoad();
  },
  geta: function() {
    var e = this;
    (0, t.memberAccount)().then(function(t) {
      200 === t.data.code && e.setData({
        user_integral: t.data.data.user_integral,
        js: t.data.data.js
      });
    });
  },
  getUser: function() {
    var n = this;
    (0, t.getUserInfo)().then(function(t) {
      200 === t.data.code && (n.setData({
        userinfo: t.data.data
      }), (0, e.setUserInfo)(t.data.data));
    });
  },
  onHide: function() {},
  onUnload: function() {},
  onPullDownRefresh: function() {
    wx.stopPullDownRefresh(), this.getUser();
  },
  onReachBottom: function() {},
  onShareAppMessage: function() {}
});